package desmontec.relatorios.gerador;

import jxl.format.Alignment;
import jxl.format.Border;
import jxl.format.BorderLineStyle;
import jxl.write.WritableCellFormat;
import jxl.write.WritableFont;
import jxl.write.WriteException;

public class FontesRelatorioMapaEstocagem {

	private WritableCellFormat arialHead;
	private WritableCellFormat arialBoldBody;
	private WritableCellFormat arialBoldBodyDPG;
	private WritableCellFormat arialBody;
	private WritableCellFormat arialBodyLeft;
	private WritableCellFormat arialBodyRetardo;
	private WritableCellFormat arialLocalData;
	private static FontesRelatorioMapaEstocagem instance;

	// ALTERACAO PARA SINGLETON
	private FontesRelatorioMapaEstocagem() throws WriteException {
		WritableFont arialHeadFont = new WritableFont(WritableFont.ARIAL, 12);
		this.arialHead = new WritableCellFormat(arialHeadFont);
		this.arialHead.setWrap(true);
		this.arialHead.setAlignment(Alignment.CENTRE);

		WritableFont arialBoldFont = new WritableFont(WritableFont.ARIAL, 8,
				WritableFont.BOLD);
		this.arialBoldBody = new WritableCellFormat(arialBoldFont);
		this.arialBoldBody.setWrap(true);
		this.arialBoldBody.setAlignment(Alignment.CENTRE);
		this.arialBoldBody.setBorder(Border.LEFT, BorderLineStyle.MEDIUM);

		WritableFont arialBoldFontDPG = new WritableFont(WritableFont.ARIAL, 8,
				WritableFont.BOLD);
		this.arialBoldBodyDPG = new WritableCellFormat(arialBoldFontDPG);
		this.arialBoldBodyDPG.setWrap(true);
		this.arialBoldBodyDPG.setAlignment(Alignment.CENTRE);
		this.arialBoldBodyDPG.setBorder(Border.LEFT, BorderLineStyle.MEDIUM);
		this.arialBoldBodyDPG.setBorder(Border.BOTTOM, BorderLineStyle.THIN);

		WritableFont arialFont = new WritableFont(WritableFont.ARIAL, 8);
		this.arialBody = new WritableCellFormat(arialFont);
		this.arialBody.setWrap(true);
		this.arialBody.setAlignment(Alignment.CENTRE);
		this.arialBody.setBorder(Border.LEFT, BorderLineStyle.THIN);
		this.arialBody.setBorder(Border.RIGHT, BorderLineStyle.THIN);

		WritableFont arialFontRetardo = new WritableFont(WritableFont.ARIAL, 8);
		this.arialBodyRetardo = new WritableCellFormat(arialFontRetardo);
		this.arialBodyRetardo.setWrap(true);
		this.arialBodyRetardo.setAlignment(Alignment.CENTRE);
		this.arialBodyRetardo.setBorder(Border.LEFT, BorderLineStyle.THIN);
		this.arialBodyRetardo.setBorder(Border.RIGHT, BorderLineStyle.MEDIUM);

		WritableFont arialLeftFont = new WritableFont(WritableFont.ARIAL, 8);
		this.arialBodyLeft = new WritableCellFormat(arialLeftFont);
		this.arialBodyLeft.setWrap(true);
		this.arialBodyLeft.setAlignment(Alignment.LEFT);
		
		WritableFont arialLocalData = new WritableFont(WritableFont.ARIAL, 8);
		this.arialLocalData = new WritableCellFormat(arialLocalData);
		this.arialLocalData.setWrap(true);
		this.arialLocalData.setAlignment(Alignment.LEFT);
		this.arialLocalData.setBorder(Border.RIGHT, BorderLineStyle.MEDIUM);
		this.arialLocalData.setBorder(Border.LEFT, BorderLineStyle.MEDIUM);
		this.arialLocalData.setBorder(Border.TOP, BorderLineStyle.MEDIUM);
		
		
	}

	public WritableCellFormat getArialHead() {
		return arialHead;
	}

	public void setArialHead(WritableCellFormat arialHead) {
		this.arialHead = arialHead;
	}

	public WritableCellFormat getArialBoldBody() {
		return arialBoldBody;
	}

	public void setArialBoldBody(WritableCellFormat arialBoldBody) {
		this.arialBoldBody = arialBoldBody;
	}

	public WritableCellFormat getArialBoldBodyDPG() {
		return arialBoldBodyDPG;
	}

	public void setArialBoldBodyDPG(WritableCellFormat arialBoldBodyDPG) {
		this.arialBoldBodyDPG = arialBoldBodyDPG;
	}

	public WritableCellFormat getArialBody() {
		return arialBody;
	}

	public void setArialBody(WritableCellFormat arialBody) {
		this.arialBody = arialBody;
	}

	public WritableCellFormat getArialBodyLeft() {
		return arialBodyLeft;
	}

	public void setArialBodyLeft(WritableCellFormat arialBodyLeft) {
		this.arialBodyLeft = arialBodyLeft;
	}

	public WritableCellFormat getArialBodyRetardo() {
		return arialBodyRetardo;
	}

	public void setArialBodyRetardo(WritableCellFormat arialBodyRetardo) {
		this.arialBodyRetardo = arialBodyRetardo;
	}

	public WritableCellFormat getArialLocalData() {
		return arialLocalData;
	}

	public void setArialLocalData(WritableCellFormat arialLocalData) {
		this.arialLocalData = arialLocalData;
	}

	public static FontesRelatorioMapaEstocagem getInstance() throws WriteException {
		if(instance == null){
			instance = new FontesRelatorioMapaEstocagem();
		}
		return instance;
	}
	
}
